Microprocessors can only represent two signs (states):
010, 1.What is the decimal number 139 in the binary counting frame?
What is the decimal number 139 in the binary counting frame?
\[(1 \times 2^7) + (1 \times 2^3) + (1 \times 2^1) + (1 \times 2^0) = 139.\]
What is the decimal number 139 in the binary counting frame?
\[(1 \times 2^7) + (1 \times 2^3) + (1 \times 2^1) + (1 \times 2^0) = 139.\]
\[(1 \times 2^7) + (0 \times 2^6) + (0 \times 2^5) + (0 \times 2^4) + (1 \times 2^3)\\ + (0 \times 2^2) + (1 \times 2^1) + (1 \times 2^0) = 139.\]
139 in the decimal system corresponds to 10001011 in the binary system.If computers only understand 0 and 1, how can they express decimal numbers like 139?
If computers only understand 0 and 1, how can they express decimal numbers like 139?
0/1 switch).| Number | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|
| Number | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|---|
| 0 = | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Number | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|---|
| 0 = | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 1 = | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
| Number | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|---|
| 0 = | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 1 = | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
| 2 = | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
| Number | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|---|
| 0 = | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 1 = | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
| 2 = | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
| 3 = | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 |
| Number | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|---|
| 0 = | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 1 = | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
| 2 = | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
| 3 = | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 |
| … | ||||||||
| 139 = | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 |
How can a computer understand text if it only understands 0s and 1s?
A modified version of South Korean Dubeolsik (two-set type) for old hangul letters. (Illustration by Yes0song 2010, Creative Commons Attribution-Share Alike 3.0 Unported)
How can a computer understand text if it only understands 0s and 1s?
0s and 1s correspond to specific letters/characters of different human languages.How can a computer understand text if it only understands 0s and 1s?
0s and 1s correspond to specific letters/characters of different human languages.ASCII logo. (public domain).
| Binary | Hexadecimal | Decimal | Character |
|---|---|---|---|
| 0011 1111 | 3F | 63 | ? |
| 0100 0001 | 41 | 65 | A |
| 0110 0010 | 62 | 98 | b |
Two core themes of this course:
Two core themes of this course:
In both of these domains we mainly work with one simple type of document: text files.
0s and 1s)!0s and 1s)! Install RStudio from here!
Install Atom from here!
The ‘blackbox’ of data processing.
Basic components of a standard computing environment.
Recall the initial example (survey) of this course.
Access a website (over the Internet), use keyboard to enter data into a website (a Google sheet in that case).
R program accesses the data of the Google sheet (again over the Internet), downloads the data, and loads it into RAM.
Data processing: produce output (in the form of statistics/plots), output on screen.